<template>
  <div id="app">
    <router-view v-if="routerAlive"/>
  </div>
</template>

<script>
import Vue from "vue";

export default {
  name: "App",
  data: function () {
    return {
      userMsg: {},
      routerAlive: true
    };
  },
  provide() {
    return {
      routerRefresh: this.routerRefresh
    }
  },
  created: function () {
    if(localStorage.getItem("systemColor") == null){  //如果颜色没有获取前先默认蓝色系  防止首页页面不同色系图片获取不到报错
      localStorage.setItem("systemColor", "blueSeries");//蓝色系
    }
    document.querySelector("html").setAttribute("class", localStorage.getItem("systemColor"));
    document.querySelector("html").style.fontSize = 10 * (window.screen.width / 375) + "px";
  },
  methods: {
    routerRefresh() {
      this.routerAlive = false
      this.$nextTick(() => {
        this.routerAlive = true
      })
    }
  },
};
</script>

<style lang="less">
@import "~vux/src/styles/reset.less";

body {
  background-color: #F4F6F8;

  .vux-header{
    background-color: transparent;
    .vux-header-left {
      .left-arrow::before{
        border: 1px solid #1D2129!important;
        border-width: 1px 0 0 1px!important;
      }
      .vux-header-back{
        color: #1D2129;
      }
    }

    .vux-header-title{
      color: #1D2129;
    }
    .vux-header-right a{
      color: #1D2129;
    }
  }
}
.hint-text {
  font-size: 14px;
  line-height: 22px;
  text-align: left;
  text-indent: 10px;
  letter-spacing: 1px;
  b {
    color: #000;
  }
}
</style>
